package com.jd.jobkeeper.server.data.pesistence;

import com.jd.jobkeeper.server.data.entity.ChangeLog;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ChangeLogRepository extends JpaRepository<ChangeLog, Long>, JpaSpecificationExecutor<ChangeLog> {

    @Query("select c from ChangeLog c where c.id > ?1 ")
    List<ChangeLog> getNext(long index, Pageable pageable);
}
